package com.info.zhiduoduo.weixin.controller;

import com.info.zhiduoduo.common.constants.SmartResult;
import com.info.zhiduoduo.common.formbean.BaseSimpleFormBean;
import com.info.zhiduoduo.weixin.formbean.order.FlowListFormBean;
import com.info.zhiduoduo.weixin.service.OrderService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

	@Autowired
	OrderService orderService;

	@PostMapping("/v1/flowList")
	public SmartResult getOrderList(@RequestBody BaseSimpleFormBean<FlowListFormBean> formBean) {
		return orderService.getFlowList(formBean);
	}

	@PostMapping("/v1/flowDetail")
	public SmartResult getFlowDetail(@RequestBody BaseSimpleFormBean<Integer> formBean) {
		return orderService.getFlowDetail(formBean);
	}
}
